<template>
  <div>
    <h1>MysqlGrant</h1>    

    <el-form :inline="true">
      <el-form-item>
        <el-input placeholder="关键字"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button>查询</el-button>
      </el-form-item>
    </el-form>

    <el-table
      border
      stripe
      :data="mysqlGrantList">
      <el-table-column sortable prop="dataNodeId" label="dataNodeId"/>
      <el-table-column sortable prop="url" label="url"/>
      <el-table-column sortable prop="username" label="username"/>
      <el-table-column sortable prop="grants" label="grants"/>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      mysqlGrantList: []
    };
  },

  methods: {

  },

  mounted() {
    var _this = this;
    sdk.DataNodeApi().showGrants().then(res => {
      _this.mysqlGrantList = res;
    });
  }
}
</script>